<template>
    <div class="combo-box">
        <div class="combo-box-item" @click="selectPayTypeAction(2)">
            <div class="combo-box-item-left">
                <input type="radio" value="2" v-model="combo"></input>
            </div>
            <div class="combo-box-item-right" :class="{'combo-border':combo==2}">
                <img src="@/assets/images/one.png">
            </div>
        </div>
        <div class="combo-box-item" @click="selectPayTypeAction(3)">
            <div class="combo-box-item-left">
                <input type="radio" value="3" v-model="combo"></input>
            </div>
            <div class="combo-box-item-right" :class="{'combo-border':combo==3}">
                <img src="@/assets/images/two.png">
            </div>
        </div>
    </div>
</template>

<script>
export default {
  name: 'combo02',
  data () {
    return {
      combo: ''
    }
  },
  methods: {
    selectPayTypeAction (num) {
      this.combo = num
      this.$emit('result', num)
    }
  }
}
</script>

<style scoped lang="less">
    .combo-border{
        border: 1px solid #019fe6;
    }
    .combo-box {
        display: flex;

        &-item {
            display: flex;
            justify-content: center;
            align-items: center;
            margin-right: 40px;

            &-left {
                margin-right: 5px;
            }

            &-right {
                width: 400px;
                height: 150px;
                border-radius: 4px;
                overflow: hidden;
                box-shadow: darkgrey 5px 4px 6px 3px;

                img {
                    width: 100%;
                }
            }
        }
    }
</style>
